package com.zxy.permission_stu.listener;

import com.zxy.permission_stu.service.IClassesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * @Auther: lenovo
 * @Date: 2021/12/2 17:04
 * @Description:
 */
@Component
public class MyListener implements ApplicationListener {

    @Autowired
    private IClassesService classesService;
    @Override
    public void onApplicationEvent(ApplicationEvent applicationEvent) {
        classesService.listAll();
    }
}
